package com.wangyw.Test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.wangyw.pojo.User;
import com.wangyw.service.IHelloWorldService;
import com.wangyw.service.IUserServ;

public class AopTest {
    public void testHelloworld() {  
        ApplicationContext ctx =  new ClassPathXmlApplicationContext("applicationContext.xml");  
        IHelloWorldService helloworldService =  
        ctx.getBean("helloWorldService", IHelloWorldService.class);  
        helloworldService.sayHello("wangyw");  
    } 
    
    public void testFindUser(){
    	 ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:conf/aopContext.xml");  
         IUserServ iuserServ = (IUserServ)ac.getBean("userServProxy");  
         iuserServ.findAllUser(); 
    }
    
    public static void main(String[] args) {
		new AopTest().testFindUser();
	}
}
